#ifndef UAE
#define UAE

#include "pAgent.h"
#include <vector>
using namespace std;
/* this algorithm works where we have two players */

class uae : public pAgent {
public:
	uae(int num_actions,int** payoffs, double learn_rate);
	~uae();
	int Move();
	void Update(int* actions, double r_t);
private: 
	int** payoffs;
	int min,max; //payoffs
	double alpha;
	float learning_rate;
	unsigned int num_actions;
	// stores the history
	vector<int>* rewards;
	vector< double* >* strategies; // either pure or mixed over time
	vector<int>* his_actions;
	vector<int>* my_actions;
	unsigned int Time;

	// the action that coult give the max payoff
	unsigned int max_act;

	//calculates regret value. If > threshold, return regreted action
	//else return -1
	int regret();

	//vector dot product
	double dot(double* v1, double* v2);
	//print a vector
	void printV(double* str);


};


#endif
